package com.sanmu.Test;

import com.sanmu.bean.Cat;
import org.junit.Test;
import org.springframework.context.support.ClassPathXmlApplicationContext;

/**
 * @version 1.0
 * @Author xinnian
 * @Date 2024/9/14 13:17
 * @注释
 * @create: 2024-09-14 13:17
 */

public class scopeTest {
    @Test
    public void test(){
        ClassPathXmlApplicationContext ioc = new ClassPathXmlApplicationContext("beans.xml");
        Cat cat = ioc.getBean("Cat", Cat.class);
        Cat cat1 = ioc.getBean("Cat", Cat.class);
        Cat cat2 = ioc.getBean("Cat", Cat.class);
        System.out.println(cat);
        System.out.println(cat1);
        System.out.println(cat2);

    }
}
